home *** CD-ROM | disk | FTP | other *** search
- public class RegionTriggerRotate extends Codex {
- private CodexThing _rotateObject;
- private int _frameNum = 1;
- private float _duration = 3.0F;
- private boolean bRotated;
- public static String[] _params = new String[]{"Rotate object", "Rotate around frame;1", "Duration;3.0"};
-
- public RegionTriggerRotate(CodexThing rotateObject, int frameNum, float duration) {
- this._rotateObject = new CodexThing(((Codex)rotateObject).GetGUID());
- this._frameNum = frameNum;
- this._duration = duration;
- }
-
- public void restore(int flags) {
- this.bRotated = CodexSequence.RestoreBoolean();
- }
-
- public void entered(int guid, int causeGUID, int captureID) {
- if (Codex.IsPlayerGuid(causeGUID)) {
- if (!this.bRotated) {
- CodexThing enterThing = new CodexThing(causeGUID);
- if (enterThing.IsPlayer()) {
- this._rotateObject.RotatePivot(this._frameNum, this._duration);
- this.bRotated = true;
- }
- }
-
- }
- }
-
- public void save(int flags) {
- CodexSequence.SaveBoolean(this.bRotated);
- }
- }
-